package com.cjkj.system.service.impl;

import com.cjkj.common.core.utils.DateUtils;
import com.cjkj.system.api.domain.THospitalUserLoginLog;
import com.cjkj.system.mapper.THospitalUserLoginLogMapper;
import com.cjkj.system.service.ITHospitalUserLoginLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 医院用户系统访问记录Service业务层处理
 * 
 * @author cjkj
 * @date 2024-08-30
 */
@Service
public class THospitalUserLoginLogServiceImpl implements ITHospitalUserLoginLogService 
{
    @Resource
    private THospitalUserLoginLogMapper tHospitalUserLoginLogMapper;

    /**
     * 查询医院用户系统访问记录列表
     * 
     * @param tHospitalUserLoginLog 医院用户系统访问记录
     * @return 医院用户系统访问记录
     */
    @Override
    public List<THospitalUserLoginLog> selectTHospitalUserLoginLogList(THospitalUserLoginLog tHospitalUserLoginLog)
    {
        return tHospitalUserLoginLogMapper.selectTHospitalUserLoginLogList(tHospitalUserLoginLog);
    }

    /**
     * 新增医院用户系统访问记录
     * 
     * @param tHospitalUserLoginLog 医院用户系统访问记录
     * @return 结果
     */
    @Override
    public int insertTHospitalUserLoginLog(THospitalUserLoginLog tHospitalUserLoginLog)
    {
        tHospitalUserLoginLog.setAccessTime(DateUtils.getNowDate());
        return tHospitalUserLoginLogMapper.insertTHospitalUserLoginLog(tHospitalUserLoginLog);
    }

    /**
     * 批量删除医院用户系统访问记录
     * 
     * @param logIds 需要删除的医院用户系统访问记录主键
     * @return 结果
     */
    @Override
    public int deleteTHospitalUserLoginLogByLogIds(Long[] logIds)
    {
        return tHospitalUserLoginLogMapper.deleteTHospitalUserLoginLogByLogIds(logIds);
    }
}
